<!--
 * @Author: Hzl
 * @Date: 2021-09-17 14:19:41
 * @LastEditors: Hzl
 * @LastEditTime: 2021-09-26 15:21:21
 * @Description: 封装底部组件
-->
<template>
    <div>
        <!-- 底部 -->
        <div class="footer">
            <div class="footer_top">
                <img src="../assets/resource/img/footer-logo.png" alt="">
            </div>
            <div class="address">
                {{address}}
            </div>
            <div class="copyright">
                版权所有：太原工业学院  ICP备案号：晋ICP备14003279号  晋公网安备号：140110430070001
            </div>
        </div>
        <!-- /底部 -->
    </div>
</template>

<script>
import {get} from '../utils/request'
export default {
    data(){
        return{
            address:""
        }
    },
    created(){
        this.loadAddress();
    },
    methods:{
        //加载地址
        loadAddress(){
            let url = '/index/findByKey';
            get(url,{name:'address'}).then(res =>{
                let data=res.data;
                //如果地址存在，给我返回
                if(data){
                    this.address=data.val;
                }
            })
        }
    },

}
</script>

<style lang="scss">
      //底部样式
    .footer{
        text-align: center;
        background-color: #194f91;
        color: #ffffff;
        padding: 20px 0;
        .footer_top{
            border-bottom: 1px solid rgb(6, 112, 211);
        }
        
    }
</style>